const fs = require("fs");
fs.mkdirSync("./监狱/吴亦凡",{recursive:true});
let test = fs.openSync("./监狱/吴亦凡/独白.txt","a");
console.log(test);

//同步读取
let res = fs.readFileSync("./监狱/吴亦凡/独白.txt","utf8");
console.log(res);

//同步编写
fs.writeFileSync("./监狱/吴亦凡/独白.txt","我说道做到",{flag:"a"});
//关闭txt文件
fs.closeSync(test);
//创建文件夹
fs.mkdirSync("./监狱/吴亦凡/大碗宽面",{recursive:true});
//给独白改名成 说明 移动到 大碗宽面里
fs.renameSync("./监狱/吴亦凡/独白.txt","./监狱/吴亦凡/大碗宽面/说明.txt")
//删除目录
fs.rmdirSync("./监狱",{recursive:true});